package cn.mesmile.swagger.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author zb
 * @date 2021/4/19 11:33
 * @Description
 */
@ApiModel(value = "接收查询员工类参数", description = "接收查询员工类参数")
@Data
public class EmployeeDTO {

    // @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")

    @ApiModelProperty(value = "用户名", example = "张三", notes = "用户名是唯一的", required = true)
    private String username;

    @ApiModelProperty(value = "年龄", example = "18", notes = "代表用户年龄,整数", required = true)
    private Integer age;

    /** 将前端传过来的日期字符串转换为Date */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "生日", example = "2021-04-23", notes = "用户生日", required = true)
    private Date birthday;

    @ApiModelProperty(value = "创建时间", example = "2021-04-19T12:20:23", notes = "创建时间", required = true)
    private Date createDateTime;

}
